PageSpinner Includes


Tips & Hints

Tips and Hints

Editing Files Containing Include Comments
Site maintenance
Files vs. Notebook Pages
Keeping JavaScript in Include Files and Pages

Back to Index Page

Editing Files Containing Include Comments

To insert an Include comment
Use the menu item Paste Include... in the Edit menu to insert an Include comment tag pair.

To open an Include File
Select the name of the include file in the editor. Use the menu item Open Selection in the File menu to quickly open the Include file that is being included. This feature is especially useful if you have a hierarchy of multiple Include folders or include files with the same names.

Editing pages in other editors
If you are editing pages containing include comments with other editors that don't display HTML comments, you need to remember which parts of the page that are inserted by PageSpinner's Includes.


Site maintenance

PageSpinner's hierarcic structure of Include Files and the includable Notebook pages make it easier to edit and organize the contents of large web sites.

But to really harness the include's full power you will need a way to easily update all pages when an Include file has been changed. This can be done by using AppleScript. In PageSpinner's AppleScript menu you will find a script named Update Include Files in Folder.... This script automatically updates all files in a specific folder that contains an include comment. With the use of AppleScript it is possible to write more advanced scripts, such as updating all folders in an entire site.


Files vs. Notebook Pages

The advantages of using Include files or Notebook pages:

Include files are:
- easy to transfer between different machines and systems
- easy to share between co-workers
- easier to backup than the Notebook contents
- enables hierarchic structure of include files

Notebook pages are:
- easy to access and maintain in the Notebook window


Keeping JavaScript in Include Files and Pages

A very handy usage of PageSpinner's Includes, is to keep a collection of frequently used JavaScripts in an include file or Notebook page, and have an include comment on the pages that should use the scripts.

This makes it easy to develop and enhance several pages that rely on a set of JavaScripts. Although the latest JavaScript versions has support for storing and accessing scripts in separate files, including the same scripts on every page is the only way to get handle your JavaScripts in a modular way if you want to support older browser versions.

Files placed inside the global Includes folder (in PageSpinner's application folder) are possible to include in any page you edit with PageSpinner. This enables you to keep a collection of useful JavaScripts available to all pages you create. JavaScript files should end with .js if they are placed in an Includes folder. There is an example file called time.js in the global Includes folder.

Back to Index Page


Last updated: 12:53 PM, 09/18/2000
© 1995-2000 Optima System.